int lengthOfLongestSubstring(char * s){
	char *h=s,*r=s;
	int max=0;
	while(*r != NULL){
		for(char *p=h;p<r;p++){
			if(*p==*r){
				h=p+1;
				break;
			}
		}
		if(r-h+1>max){
			max=r-h+1;
		}
		r++;
	}	
	return max;
}
